The present invention relates to a method and apparatus for reducing blocking and ringing artifacts associated with coding of images or video frames. More particularly, this invention relates to a method and apparatus that recovers or adjusts quantized coefficients by using a nonlinear scheme.
Quantization is a well known process where the coefficients are quantized by a quantization scale or level (quantizer). Namely, the process of quantization reduces the accuracy with which the coefficients are represented by dividing the coefficients by a set of values (quantization scales or levels) with appropriate rounding to form integer values. This quantization process is generally known as uniform quantization. Alternatively, quantization can be implemented as non-uniform quantization, where a bin (a range of mapped values) varies with the input signal. However, the process of quantization (uniform or non-uniform) is lossy. Namely, after a coefficient has been quantized, a decoder (without the benefit of additional information) would not be able to recover the original coefficient values.
Furthermore, quantization is frequently employed in coding/decoding applications, e.g., video encoders and video decoders. The significant saving in encoded bits resulting from the quantization process is an important factor for codec applications. In addition, adjusting the quantization level for a frame or picture is a popular method of controlling the number of bits generated by an encoder (generally referred to as xe2x80x9crate controlxe2x80x9d).
However, since the quantization process is lossy, it contributes to the blocking and ringing artifacts exhibited by decoded images. Some of these effects often can be traced to the quantization of the coefficients produced by a transform operation. Furthermore, since many transforms are designed to be orthogonal, there is no linear correlation among the coefficients to aid in the recovery of the coefficients by linear methods.
Therefore, a need exists in the art for a method and apparatus for recovering quantized coefficients.
The present invention is a method and apparatus for recovering or adjusting quantized coefficients by using a nonlinear method. A forward transform is employed to adjust the quantized coefficients after post inverse quantization and inverse transform operations are performed.
More specifically, the quantized coefficients are initially transformed into pixel values using complementary inverse quantization and transform operations. However, due to the lossy process of quantization, the resulting decoded pixel values are not the identical original pixel values prior to undergoing the encoding and decoding process. To more accurately recover the original pixel values, the decoded pixel values are adjusted using a forward or direct transform that is equivalent to the forward transform that was used in the encoder to encode the original signal. The method divides the decoded pixel values into a plurality of blocks, where each block is, in turn, divided into a plurality of subblocks. Coefficient corrections or adjustments which are derived from a fitting function, (e.g., the difference between a median and a certain expected value, like xe2x80x9c0xe2x80x9d for motion compensated blocks) calculated for the subblocks, are applied to the transform to produce transform coefficients. These transform coefficients are then compared with the quantization step employed by the encoding process to determine whether the coefficient corrections should be used to adjust the decoded pixel values.